Fixed crashbug, now to fix rendering