Fixed more code issues