Fixed some last bugs & errors