fix minor bug with freegui after invocation