Fixing Some code