Fix for #1073: handle dynamic more elegantly