fixed bug with empty stream and now converting speed and position to double