Fixed some tiny bugs