Fix wrong static_cast conversions when executing info actions

When the target was a egg or a bug, the conversion was always done to a sw::bug.