Added better ex handling