Fixed some issues pointed out by numbers-san