Workflows position fix

This fix addresses #2177 to make workflows work correctly with the newest workflow update.

The implementation also includes a slightly modified version of @jirikuncar suggested fix.