Added some important fixes.