Fixed messed code after merging which went wrong.