Fixed some buggs