Major fix 17/09

Fixed some important bugs!