#485 - fixing null pointer and fixing some scenarios with rollback handler