Properly call finish in case of error so action doesn't hang