fixed enderchest refilling and resume function to work together