fixed bug with ghost