Bug fixing stuff...