Fixing afew errors