fix bugs, remove use of pry in production