Fix some compiler warnings caused by wrong type annotations