Found and fixed bug