Fix signal handlers.
Added loader test.