Fixes foreach