Fixes small bugs