Added safety check for EQUEUE_LENGTH definition