Fixing bugs from travis testing