Add explicit cast to fix #27