bugfix with Alan