num flags was hard coded for some reason fix