Corrected a bug with the access window, cos two instances of the same function existed on the same file working.