Added some signal handling