Commit with memory allocated problem solved