Updated and fixed a bug