Fixed some bug(s)