fixing order bug