Merged with develop and fixed bug