FATAL ERROR FOUND AND FIXED!!! serial must not be a global variable!