Fixed bug: would not give java program control of console when run