Many bugs fixed!