tried setting default values for variables at declaration, didn't fix issue