Fixing small bugs