updated some bug fixes