Fix select shard in application controller and user model