Restored custom_slug functionality, fixes #2761

:scissors: this line should be outside expect block