Bug fixes

Returns null on close or cancel.