fix typos and inefficient type conversion warnings

no functional changes, just some cleanup to see less warnings in my workspace