set environment and fix before_script