Fixes for enhanced ruby mode