Fixed bugs 3598719, 3598720 and 3599328.

git-svn-id: https://chibios.svn.sourceforge.net/svnroot/chibios/branches/stable_2.4.x@5035 35acf78f-673a-0410-8e92-d51de3d6d3f4