Fix some issues

- Correct crypt() check
- Correct flush_* functions