Spaceplanes are ludicrously hard to get right in KSP. The aerodynamics model is not very good and the process whereby fuel is taken from the frontmost tank first tends to make the plane flip halfway through the ascent.
I've occasionally considered writing something with a better aerodynamics sim in ...