Fixing encountered bug