fixed bug in sim