getting NPEs from qualification-related stuff
fixed randomization bug