rescue ActiveRecord::RecordInvalid => e
    flash.now[:error] = 'Problems creating your new study'
    respond_to do |format|
      format.html { render action: 'new' }
      format.xml { render xml: @study.errors, status: :unprocessable_entity }