Added onOpen callback