Fixed some serious issues