Fixed some logic
test