Fixed the bug when shape was floating.