fixed cut gen stack management; fixed DB compilation; cc_handler clean-up