def fixed bug