fixed fragmentation bug