Few fixes related to unit tests