Fixed wrong order bug