fix for semantic bug

@fosdev Please review and merge!