Still trying to fix the bug