Fixed on close being called without enough args
Debugging travis