Just some bug fixes