Minor bug fixing