Possibly cleaner way of modules workaround