some changes to make things work in different environments automatically