fixed the message pushing and added more informative debugging messages