add default case for error expression
fix compilation errors