fix warnings and remove debug print