Fixing Authorization Bug