Fix #7 by adding a check if action sheet is presented