Fix order of execution to prevent warnings on travis