fixes for running as the correct user