Fixed the isfree bug when mallocing