How to fix bug