fixing crash on no patient selection