Added check for free blocks