WINDOWS - fixed faulty cast