Some logical changes