Fix some problems