Fixes for stm32f4 (close #81)