Some fixes
Fix bugs