Refactored 51% fix & added brackets (style is everything ;)