Fix hash bug and carrierwave bug