Seems to work from the command line but not inside IntelliJ