added some safety to the parse function
Merge branch 'master' into async_selectors