CLOUDSTACK-7079: Fixed the issue where rollback was called after commit. As well, added few null checks