Fixed crash on orientation change

Dirty fix.
Project structure a bit messy.