Minor and stupid bug fixes