Fixed ugly code in all views