added warning, fixed bugs