add static cast to wake.cpp