Fixed more bugs