fixed bug in filling