added psr saving. fixed double interrupt handling