crap logic corrected
Merge origin/master