Dirty implementation of signal catching