Several small bugs

1 
1