Fixing some stupid bugs :-)