Fixed problem with program not waiting for bat to finish, and bat now shows itself instead of starting minimised