Fixed all those pesky crashes and errors