Fixed issues raised by Markus.