Fixed NullPointerException.
Fixed invalid application bechaviour - do not rollback the transaction
in case of exception.