Fix settings form bugs