Solves view issue (needs a bit of a cleanup though)