Some bugs fixed, still doesn't work