Fixed lightning errors... Ugly code. :(