changed a define name and added reset conditions for decompression