Fix a handfull of small bugs