Pop up windows working (except value not being passed, always 0)