Improve cmd_load() based on @rummik's suggestsions.