Resolved some issues in allocating and deallocating blocks
 Fixing bugs