Removed pygui call as it seems to work without it now