Fixed AMO warning about setting oncommand programmatically